using Andromeda.Global.Business.DataObject;
using ForgeIt.Dal.dbo;
using System;

using System.Collections.Generic;
using System.Linq;
using Andromeda.Global.Data;

namespace ForgeIt.Business.Stub
{
	public abstract class ContactTypeStub : DataObjectModelBase
	{
		#region private fields


		private DBContactType foDBContactType;


		#endregion private fields
    
		#region public constructors

		protected ContactTypeStub()
			: this(new DBContactType())
		{
		}

		#endregion public constructors
    

		#region internal constructors

		internal ContactTypeStub(DBContactType foDBContactType)
		{

			this.foDBContactType = foDBContactType;

		}

		#endregion internal constructors
  

		#region protected datasource properties
		

		internal DBContactType DB_DBContactType
		{
			get { return foDBContactType ?? (foDBContactType = new DBContactType()); }
		}

		
		public override DataConnectorCollection DataObjects
		{
			get
			{
				return new DataConnectorCollection { foDBContactType } ;
			}
		}

		

		/// 
		///
		/// 
		public int IdContactType
		{
			get { return DB_DBContactType.IdContactType; }

		}

		/// 
		///
		/// 
		public string Description
		{
			get { return DB_DBContactType.Description; }

			set { DB_DBContactType.Description = value; }

		}

		#endregion protected datasource properties
    
		#region protected datasource foreign key properties
    

  
		#endregion protected datasource foreign key properties
    
		#region protected datasource external key properties
    

  
		#endregion protected datasource external key properties
    
		#region properties
    

		#endregion properties
    
		#region methods methods

		#endregion methods

        #region Static Factories

        public static ContactType GetContactType(int foIdContactType)
        {
          return new ContactType(DBContactType.GetEntity(foIdContactType));
        }
  
        public static IEnumerable<ContactType> ListContactType()
        {
            return (from DBContactType entity in DBContactType.ListEntity() select new ContactType(entity));
        }
        
  
        public static IEnumerable<ContactType> ListContactType(object foIdContactType, object foDescription)
        {
            return (from DBContactType entity in DBContactType.ListEntity(foIdContactType, foDescription) select new ContactType(entity));
        }
        
        #endregion Static List Methods

	
  }
}